﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;

using EF.BLL.Base;
using EF.Util;

public partial class Trans_Base_Lang : System.Web.UI.Page
{
    private LangService langBLL = new LangService();

    protected void Page_Load(object sender, EventArgs e)
    {
        //CheckSession();

        Response.Clear();

        switch (Request["action"].ToString().ToLower())
        {
            case "lang":
                GetLang();
                break;
            default:
                break;
        }

        Response.End();
    }

    private void GetLang()
    {
        try
        {
            string marks = Request["marks"].ToString();

            DataTable dt = langBLL.GetLang(marks, Session["lang"].ToString());
            Response.Write("{success:true,rows:" + JsonHelp.WriteDataTable(dt) + "}");
        }
        catch (Exception e)
        {
            Response.Write("{success:false}");
        }
    }
}
